﻿using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.PostProcessing;
using UnityEngine.UI;
using UnityStandardAssets.ImageEffects;

namespace Studio
{
	// Token: 0x020005C6 RID: 1478
	public class SystemButtonCtrl : MonoBehaviour
	{
		// Token: 0x17000495 RID: 1173
		// (set) Token: 0x060025A1 RID: 9633 RVA: 0x000DE7E4 File Offset: 0x000DC9E4
		public bool visible
		{
			set
			{
				if (value)
				{
					if (MathfEx.RangeEqualOn<int>(0, this.select, this.commonInfo.Length - 1))
					{
						this.commonInfo[this.select].active = true;
					}
				}
				else
				{
					for (int i = 0; i < this.commonInfo.Length; i++)
					{
						this.commonInfo[i].active = false;
					}
				}
			}
		}

		// Token: 0x060025A2 RID: 9634 RVA: 0x000DE854 File Offset: 0x000DCA54
		public void OnClickSelect(int _idx)
		{
			if (MathfEx.RangeEqualOn<int>(0, this.select, this.commonInfo.Length - 1))
			{
				this.commonInfo[this.select].active = false;
				if (this.select == 2)
				{
					Singleton<Studio>.Instance.SaveOption();
				}
			}
			this.select = ((this.select != _idx) ? _idx : -1);
			if (MathfEx.RangeEqualOn<int>(0, this.select, this.commonInfo.Length - 1))
			{
				this.commonInfo[this.select].active = true;
			}
			Singleton<Studio>.Instance.colorPaletteCtrl.visible = false;
		}

		// Token: 0x060025A3 RID: 9635 RVA: 0x000DE8FC File Offset: 0x000DCAFC
		public void OnClickSave()
		{
			Singleton<Studio>.Instance.colorPaletteCtrl.visible = false;
			Singleton<Studio>.Instance.SaveScene();
			NotificationScene.spriteMessage = this.spriteSave;
			NotificationScene.waitTime = 1f;
			Singleton<Scene>.Instance.Load(new Scene.Data
			{
				sceneName = "StudioNotification",
				isLoading = false,
				isAsync = false,
				isFade = false,
				isOverlap = true,
				isAdd = true
			});
		}

		// Token: 0x060025A4 RID: 9636 RVA: 0x000DE978 File Offset: 0x000DCB78
		public void OnClickLoad()
		{
			Singleton<Studio>.Instance.colorPaletteCtrl.visible = false;
			Singleton<Scene>.Instance.Load(new Scene.Data
			{
				sceneName = "StudioSceneLoad",
				isLoading = false,
				isAsync = false,
				isFade = false,
				isOverlap = false,
				isAdd = true
			});
		}

		// Token: 0x060025A5 RID: 9637 RVA: 0x000DE9D4 File Offset: 0x000DCBD4
		public void OnClickInit()
		{
			Singleton<Studio>.Instance.colorPaletteCtrl.visible = false;
			CheckScene.sprite = this.spriteInit;
			CheckScene.unityActionYes = new UnityAction(this.OnSelectInitYes);
			CheckScene.unityActionNo = new UnityAction(this.OnSelectIniteNo);
			Singleton<Scene>.Instance.Load(new Scene.Data
			{
				sceneName = "StudioCheck",
				isLoading = false,
				isAsync = false,
				isFade = false,
				isOverlap = true,
				isAdd = true
			});
		}

		// Token: 0x060025A6 RID: 9638 RVA: 0x000DEA60 File Offset: 0x000DCC60
		private void OnSelectInitYes()
		{
			Singleton<Scene>.Instance.UnLoad();
			Singleton<Studio>.Instance.InitScene(true);
		}

		// Token: 0x060025A7 RID: 9639 RVA: 0x000DEA78 File Offset: 0x000DCC78
		private void OnSelectIniteNo()
		{
			Singleton<Scene>.Instance.UnLoad();
		}

		// Token: 0x060025A8 RID: 9640 RVA: 0x000DEA88 File Offset: 0x000DCC88
		public void OnClickEnd()
		{
			Singleton<Studio>.Instance.colorPaletteCtrl.visible = false;
			Singleton<Scene>.Instance.GameEnd(true);
		}

		// Token: 0x060025A9 RID: 9641 RVA: 0x000DEAA8 File Offset: 0x000DCCA8
		public void OnClickVR()
		{
			Singleton<Studio>.Instance.ChangeVRMode();
		}

		// Token: 0x060025AA RID: 9642 RVA: 0x000DEAB4 File Offset: 0x000DCCB4
		public void Init()
		{
			if (this.isInit)
			{
				return;
			}
			GameObject gameObject = Camera.main.gameObject;
			if (this.ssaoPro == null)
			{
				this.ssaoPro = gameObject.GetComponent<SSAOPro>();
			}
			if (this.depthOfField == null)
			{
				this.depthOfField = gameObject.GetComponent<DepthOfField>();
			}
			if (this.postProcessingBehaviour == null)
			{
				this.postProcessingBehaviour = gameObject.GetComponent<PostProcessingBehaviour>();
			}
			this.profileInfo.Init(this.postProcessingBehaviour);
			this.atmosphereInfo.Init(this.spriteExpansion, this.profileInfo, new SystemButtonCtrl.EffectInfo[]
			{
				this.ssaoInfo,
				this.bloomInfo,
				this.dofInfo,
				this.vignetteInfo,
				this.automaticExposureInfo,
				this.noiseInfo
			});
			this.ssaoInfo.Init(this.spriteExpansion, this.profileInfo, this.ssaoPro);
			this.bloomInfo.Init(this.spriteExpansion, this.profileInfo);
			this.dofInfo.Init(this.spriteExpansion, this.profileInfo, this.depthOfField);
			this.vignetteInfo.Init(this.spriteExpansion, this.profileInfo);
			this.automaticExposureInfo.Init(this.spriteExpansion, this.profileInfo);
			this.noiseInfo.Init(this.spriteExpansion, this.profileInfo);
			this.isInit = true;
			this.UpdateInfo();
		}

		// Token: 0x060025AB RID: 9643 RVA: 0x000DEC38 File Offset: 0x000DCE38
		public void UpdateInfo()
		{
			this.atmosphereInfo.UpdateInfo();
			this.ssaoInfo.UpdateInfo();
			this.bloomInfo.UpdateInfo();
			this.dofInfo.UpdateInfo();
			this.vignetteInfo.UpdateInfo();
			this.automaticExposureInfo.UpdateInfo();
			this.noiseInfo.UpdateInfo();
		}

		// Token: 0x060025AC RID: 9644 RVA: 0x000DEC94 File Offset: 0x000DCE94
		public void UpdateParam()
		{
			this.atmosphereInfo.UpdateParam();
			this.UpdateInfo();
		}

		// Token: 0x060025AD RID: 9645 RVA: 0x000DECA8 File Offset: 0x000DCEA8
		private void OnEnable()
		{
			this.UpdateInfo();
		}

		// Token: 0x0400260D RID: 9741
		[SerializeField]
		private SystemButtonCtrl.CommonInfo[] commonInfo = new SystemButtonCtrl.CommonInfo[4];

		// Token: 0x0400260E RID: 9742
		private int select = -1;

		// Token: 0x0400260F RID: 9743
		[SerializeField]
		private Sprite spriteSave;

		// Token: 0x04002610 RID: 9744
		[SerializeField]
		private Sprite spriteInit;

		// Token: 0x04002611 RID: 9745
		[SerializeField]
		private SSAOPro ssaoPro;

		// Token: 0x04002612 RID: 9746
		[SerializeField]
		private DepthOfField depthOfField;

		// Token: 0x04002613 RID: 9747
		[SerializeField]
		private PostProcessingBehaviour postProcessingBehaviour;

		// Token: 0x04002614 RID: 9748
		[SerializeField]
		private SystemButtonCtrl.ProfileInfo profileInfo = new SystemButtonCtrl.ProfileInfo();

		// Token: 0x04002615 RID: 9749
		[SerializeField]
		private Sprite[] spriteExpansion;

		// Token: 0x04002616 RID: 9750
		[SerializeField]
		private SystemButtonCtrl.AtmosphereInfo atmosphereInfo = new SystemButtonCtrl.AtmosphereInfo();

		// Token: 0x04002617 RID: 9751
		[SerializeField]
		private SystemButtonCtrl.SSAOInfo ssaoInfo = new SystemButtonCtrl.SSAOInfo();

		// Token: 0x04002618 RID: 9752
		[SerializeField]
		private SystemButtonCtrl.BloomInfo bloomInfo = new SystemButtonCtrl.BloomInfo();

		// Token: 0x04002619 RID: 9753
		[SerializeField]
		private SystemButtonCtrl.DOFInfo dofInfo = new SystemButtonCtrl.DOFInfo();

		// Token: 0x0400261A RID: 9754
		[SerializeField]
		private SystemButtonCtrl.VignetteInfo vignetteInfo = new SystemButtonCtrl.VignetteInfo();

		// Token: 0x0400261B RID: 9755
		[SerializeField]
		private SystemButtonCtrl.AutomaticExposureInfo automaticExposureInfo = new SystemButtonCtrl.AutomaticExposureInfo();

		// Token: 0x0400261C RID: 9756
		[SerializeField]
		private SystemButtonCtrl.NoiseInfo noiseInfo = new SystemButtonCtrl.NoiseInfo();

		// Token: 0x0400261D RID: 9757
		private bool isInit;

		// Token: 0x020005C7 RID: 1479
		[Serializable]
		private class CommonInfo
		{
			// Token: 0x17000496 RID: 1174
			// (set) Token: 0x060025AF RID: 9647 RVA: 0x000DECB8 File Offset: 0x000DCEB8
			public bool active
			{
				set
				{
					if (this.canvas && this.canvas.enabled != value)
					{
						this.canvas.enabled = value;
						this.button.image.color = ((!value) ? Color.white : Color.green);
					}
				}
			}

			// Token: 0x0400261E RID: 9758
			public Canvas canvas;

			// Token: 0x0400261F RID: 9759
			public Button button;
		}

		// Token: 0x020005C8 RID: 1480
		[Serializable]
		private class ProfileInfo
		{
			// Token: 0x17000497 RID: 1175
			// (get) Token: 0x060025B1 RID: 9649 RVA: 0x000DED20 File Offset: 0x000DCF20
			// (set) Token: 0x060025B2 RID: 9650 RVA: 0x000DED28 File Offset: 0x000DCF28
			public PostProcessingBehaviour postProcessingBehaviour { get; private set; }

			// Token: 0x17000498 RID: 1176
			// (get) Token: 0x060025B3 RID: 9651 RVA: 0x000DED34 File Offset: 0x000DCF34
			// (set) Token: 0x060025B4 RID: 9652 RVA: 0x000DED3C File Offset: 0x000DCF3C
			public PostProcessingProfile postProcessingProfile { get; private set; }

			// Token: 0x17000499 RID: 1177
			// (get) Token: 0x060025B5 RID: 9653 RVA: 0x000DED48 File Offset: 0x000DCF48
			public PostProcessingProfile profile
			{
				get
				{
					return this.profileSet[Singleton<Studio>.Instance.sceneInfo.atmosphere].profile;
				}
			}

			// Token: 0x1700049A RID: 1178
			// (get) Token: 0x060025B6 RID: 9654 RVA: 0x000DED68 File Offset: 0x000DCF68
			public float vignetteIntensity
			{
				get
				{
					return this.profileSet[Singleton<Studio>.Instance.sceneInfo.atmosphere].vignetteIntensity;
				}
			}

			// Token: 0x1700049B RID: 1179
			// (get) Token: 0x060025B7 RID: 9655 RVA: 0x000DED88 File Offset: 0x000DCF88
			public float chromaticAberrationIntensity
			{
				get
				{
					return this.profileSet[Singleton<Studio>.Instance.sceneInfo.atmosphere].chromaticAberrationIntensity;
				}
			}

			// Token: 0x1700049C RID: 1180
			// (get) Token: 0x060025B8 RID: 9656 RVA: 0x000DEDA8 File Offset: 0x000DCFA8
			public float grainIntensity
			{
				get
				{
					return this.profileSet[Singleton<Studio>.Instance.sceneInfo.atmosphere].grainIntensity;
				}
			}

			// Token: 0x1700049D RID: 1181
			// (get) Token: 0x060025B9 RID: 9657 RVA: 0x000DEDC8 File Offset: 0x000DCFC8
			public float grainSize
			{
				get
				{
					return this.profileSet[Singleton<Studio>.Instance.sceneInfo.atmosphere].grainSize;
				}
			}

			// Token: 0x1700049E RID: 1182
			// (get) Token: 0x060025BA RID: 9658 RVA: 0x000DEDE8 File Offset: 0x000DCFE8
			public float bloomIntensity
			{
				get
				{
					return this.profileSet[Singleton<Studio>.Instance.sceneInfo.atmosphere].bloomIntensity;
				}
			}

			// Token: 0x060025BB RID: 9659 RVA: 0x000DEE08 File Offset: 0x000DD008
			public void Init(PostProcessingBehaviour _postProcessing)
			{
				this.postProcessingBehaviour = _postProcessing;
				foreach (ProfileSet profileSet in this.profileSet)
				{
					profileSet.Setup();
				}
				this.ChangeProfile();
			}

			// Token: 0x060025BC RID: 9660 RVA: 0x000DEE48 File Offset: 0x000DD048
			public void ChangeProfile()
			{
				if (this.postProcessingProfile)
				{
					UnityEngine.Object.Destroy(this.postProcessingProfile);
				}
				this.postProcessingProfile = UnityEngine.Object.Instantiate<PostProcessingProfile>(this.profile);
				this.postProcessingProfile.name = "InstantiateProfile";
				this.postProcessingBehaviour.profile = this.postProcessingProfile;
			}

			// Token: 0x04002620 RID: 9760
			public ProfileSet[] profileSet;
		}

		// Token: 0x020005C9 RID: 1481
		[Serializable]
		private class EffectInfo
		{
			// Token: 0x1700049F RID: 1183
			// (get) Token: 0x060025BE RID: 9662 RVA: 0x000DEEAC File Offset: 0x000DD0AC
			// (set) Token: 0x060025BF RID: 9663 RVA: 0x000DEEB4 File Offset: 0x000DD0B4
			public SystemButtonCtrl.ProfileInfo profileInfo { get; private set; }

			// Token: 0x170004A0 RID: 1184
			// (get) Token: 0x060025C0 RID: 9664 RVA: 0x000DEEC0 File Offset: 0x000DD0C0
			// (set) Token: 0x060025C1 RID: 9665 RVA: 0x000DEED0 File Offset: 0x000DD0D0
			public bool active
			{
				get
				{
					return this.obj.activeSelf;
				}
				set
				{
					if (this.obj.activeSelf != value)
					{
						this.obj.SetActive(value);
						this.button.image.sprite = this.sprite[(!value) ? 0 : 1];
					}
				}
			}

			// Token: 0x170004A1 RID: 1185
			// (get) Token: 0x060025C2 RID: 9666 RVA: 0x000DEF20 File Offset: 0x000DD120
			// (set) Token: 0x060025C3 RID: 9667 RVA: 0x000DEF28 File Offset: 0x000DD128
			public bool isUpdateInfo { get; set; }

			// Token: 0x060025C4 RID: 9668 RVA: 0x000DEF34 File Offset: 0x000DD134
			public virtual void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo)
			{
				this.button.onClick.AddListener(new UnityAction(this.OnClickActive));
				this.sprite = _sprite;
				this.profileInfo = _profileInfo;
				this.isUpdateInfo = false;
			}

			// Token: 0x060025C5 RID: 9669 RVA: 0x000DEF68 File Offset: 0x000DD168
			public virtual void UpdateInfo()
			{
			}

			// Token: 0x060025C6 RID: 9670 RVA: 0x000DEF6C File Offset: 0x000DD16C
			public virtual void UpdateParam()
			{
			}

			// Token: 0x060025C7 RID: 9671 RVA: 0x000DEF70 File Offset: 0x000DD170
			private void OnClickActive()
			{
				this.active = !this.active;
			}

			// Token: 0x04002623 RID: 9763
			public GameObject obj;

			// Token: 0x04002624 RID: 9764
			public Button button;

			// Token: 0x04002625 RID: 9765
			public Sprite[] sprite;
		}

		// Token: 0x020005CA RID: 1482
		[Serializable]
		private class AtmosphereInfo : SystemButtonCtrl.EffectInfo
		{
			// Token: 0x170004A2 RID: 1186
			// (get) Token: 0x060025C9 RID: 9673 RVA: 0x000DEF8C File Offset: 0x000DD18C
			// (set) Token: 0x060025CA RID: 9674 RVA: 0x000DEF94 File Offset: 0x000DD194
			private SystemButtonCtrl.EffectInfo[] effectInfo { get; set; }

			// Token: 0x060025CB RID: 9675 RVA: 0x000DEFA0 File Offset: 0x000DD1A0
			public void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo, params SystemButtonCtrl.EffectInfo[] _info)
			{
				base.Init(_sprite, _profileInfo);
				this.effectInfo = _info;
				this.dropdown.onValueChanged.AddListener(new UnityAction<int>(this.OnValueChanged));
			}

			// Token: 0x060025CC RID: 9676 RVA: 0x000DEFD0 File Offset: 0x000DD1D0
			public override void UpdateInfo()
			{
				base.UpdateInfo();
				base.isUpdateInfo = true;
				this.dropdown.value = Singleton<Studio>.Instance.sceneInfo.atmosphere;
				base.isUpdateInfo = false;
			}

			// Token: 0x060025CD RID: 9677 RVA: 0x000DF000 File Offset: 0x000DD200
			public override void UpdateParam()
			{
				base.profileInfo.ChangeProfile();
				foreach (SystemButtonCtrl.EffectInfo effectInfo2 in this.effectInfo)
				{
					effectInfo2.UpdateParam();
				}
			}

			// Token: 0x060025CE RID: 9678 RVA: 0x000DF040 File Offset: 0x000DD240
			private void OnValueChanged(int _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.atmosphere = _value;
				this.UpdateParam();
			}

			// Token: 0x04002628 RID: 9768
			public Dropdown dropdown;
		}

		// Token: 0x020005CB RID: 1483
		[Serializable]
		private class SSAOInfo : SystemButtonCtrl.EffectInfo
		{
			// Token: 0x170004A3 RID: 1187
			// (get) Token: 0x060025D0 RID: 9680 RVA: 0x000DF06C File Offset: 0x000DD26C
			// (set) Token: 0x060025D1 RID: 9681 RVA: 0x000DF074 File Offset: 0x000DD274
			private SSAOPro ssaoPro { get; set; }

			// Token: 0x060025D2 RID: 9682 RVA: 0x000DF080 File Offset: 0x000DD280
			public void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo, SSAOPro _ssao)
			{
				base.Init(_sprite, _profileInfo);
				this.ssaoPro = _ssao;
				this.toggleEnable.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedEnable));
				this.sliderIntensity.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedIntensity));
				this.sliderRadius.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedRadius));
				this.buttonColor.onClick.AddListener(new UnityAction(this.OnClickColor));
			}

			// Token: 0x060025D3 RID: 9683 RVA: 0x000DF10C File Offset: 0x000DD30C
			public override void UpdateInfo()
			{
				base.UpdateInfo();
				base.isUpdateInfo = true;
				this.toggleEnable.isOn = Singleton<Studio>.Instance.sceneInfo.enableSSAO;
				this.sliderIntensity.value = Singleton<Studio>.Instance.sceneInfo.ssaoIntensity;
				this.sliderRadius.value = Singleton<Studio>.Instance.sceneInfo.ssaoRadius;
				this.buttonColor.image.color = Singleton<Studio>.Instance.sceneInfo.ssaoColor;
				this.UpdateParam();
				base.isUpdateInfo = false;
			}

			// Token: 0x060025D4 RID: 9684 RVA: 0x000DF1A0 File Offset: 0x000DD3A0
			public override void UpdateParam()
			{
				if (this.ssaoPro == null)
				{
					return;
				}
				this.ssaoPro.enabled = Singleton<Studio>.Instance.sceneInfo.enableSSAO;
				this.ssaoPro.Intensity = 1f * Singleton<Studio>.Instance.sceneInfo.ssaoIntensity;
				this.ssaoPro.Radius = 0.12f * Singleton<Studio>.Instance.sceneInfo.ssaoRadius;
				this.ssaoPro.OcclusionColor = Singleton<Studio>.Instance.sceneInfo.ssaoColor;
			}

			// Token: 0x060025D5 RID: 9685 RVA: 0x000DF234 File Offset: 0x000DD434
			private void OnValueChangedEnable(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.enableSSAO = _value;
				this.ssaoPro.enabled = _value;
			}

			// Token: 0x060025D6 RID: 9686 RVA: 0x000DF260 File Offset: 0x000DD460
			private void OnValueChangedIntensity(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.ssaoIntensity = _value;
				this.ssaoPro.Intensity = 1f * _value;
			}

			// Token: 0x060025D7 RID: 9687 RVA: 0x000DF290 File Offset: 0x000DD490
			private void OnValueChangedRadius(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.ssaoRadius = _value;
				this.ssaoPro.Radius = 0.12f * _value;
			}

			// Token: 0x060025D8 RID: 9688 RVA: 0x000DF2C0 File Offset: 0x000DD4C0
			private void OnClickColor()
			{
				Singleton<Studio>.Instance.colorMenu.updateColorFunc = new UI_ColorInfo.UpdateColor(this.OnValueChangeColor);
				Singleton<Studio>.Instance.colorMenu.SetColor(Singleton<Studio>.Instance.sceneInfo.ssaoColor, UI_ColorInfo.ControlType.PresetsSample);
				Singleton<Studio>.Instance.colorPaletteCtrl.visible = true;
			}

			// Token: 0x060025D9 RID: 9689 RVA: 0x000DF318 File Offset: 0x000DD518
			private void OnValueChangeColor(Color _color)
			{
				Singleton<Studio>.Instance.sceneInfo.ssaoColor = _color;
				this.buttonColor.image.color = _color;
				this.ssaoPro.OcclusionColor = _color;
			}

			// Token: 0x0400262A RID: 9770
			public Toggle toggleEnable;

			// Token: 0x0400262B RID: 9771
			public Slider sliderIntensity;

			// Token: 0x0400262C RID: 9772
			public Slider sliderRadius;

			// Token: 0x0400262D RID: 9773
			public Button buttonColor;
		}

		// Token: 0x020005CC RID: 1484
		[Serializable]
		private class BloomInfo : SystemButtonCtrl.EffectInfo
		{
			// Token: 0x170004A4 RID: 1188
			// (get) Token: 0x060025DB RID: 9691 RVA: 0x000DF350 File Offset: 0x000DD550
			private BloomModel bloom
			{
				get
				{
					return base.profileInfo.postProcessingProfile.bloom;
				}
			}

			// Token: 0x060025DC RID: 9692 RVA: 0x000DF364 File Offset: 0x000DD564
			public override void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo)
			{
				base.Init(_sprite, _profileInfo);
				this.toggleEnable.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedEnable));
				this.sliderIntensity.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedIntensity));
				this.toggleDirt.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedDirt));
			}

			// Token: 0x060025DD RID: 9693 RVA: 0x000DF3D0 File Offset: 0x000DD5D0
			public override void UpdateInfo()
			{
				base.UpdateInfo();
				base.isUpdateInfo = true;
				this.toggleEnable.isOn = Singleton<Studio>.Instance.sceneInfo.enableBloom;
				this.sliderIntensity.value = Singleton<Studio>.Instance.sceneInfo.bloomIntensity;
				this.toggleDirt.isOn = Singleton<Studio>.Instance.sceneInfo.bloomDirt;
				this.UpdateParam();
				base.isUpdateInfo = false;
			}

			// Token: 0x060025DE RID: 9694 RVA: 0x000DF448 File Offset: 0x000DD648
			public override void UpdateParam()
			{
				if (this.bloom == null)
				{
					return;
				}
				this.bloom.enabled = Singleton<Studio>.Instance.sceneInfo.enableBloom;
				this.SetParam(new float?(Singleton<Studio>.Instance.sceneInfo.bloomIntensity), new bool?(Singleton<Studio>.Instance.sceneInfo.bloomDirt));
			}

			// Token: 0x060025DF RID: 9695 RVA: 0x000DF4AC File Offset: 0x000DD6AC
			private void OnValueChangedEnable(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.enableBloom = _value;
				this.bloom.enabled = _value;
			}

			// Token: 0x060025E0 RID: 9696 RVA: 0x000DF4D8 File Offset: 0x000DD6D8
			private void OnValueChangedIntensity(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.bloomIntensity = _value;
				this.SetParam(new float?(_value), null);
			}

			// Token: 0x060025E1 RID: 9697 RVA: 0x000DF518 File Offset: 0x000DD718
			private void OnValueChangedDirt(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.bloomDirt = _value;
				this.SetParam(null, new bool?(_value));
			}

			// Token: 0x060025E2 RID: 9698 RVA: 0x000DF558 File Offset: 0x000DD758
			private void SetParam(float? _intensity, bool? _dirt)
			{
				BloomModel.Settings settings = this.bloom.settings;
				if (_intensity != null)
				{
					settings.bloom.intensity = base.profileInfo.bloomIntensity * _intensity.Value;
				}
				if (_dirt != null)
				{
					settings.lensDirt.texture = ((!_dirt.Value) ? null : this.texDirt);
				}
				this.bloom.settings = settings;
			}

			// Token: 0x0400262F RID: 9775
			public Toggle toggleEnable;

			// Token: 0x04002630 RID: 9776
			public Slider sliderIntensity;

			// Token: 0x04002631 RID: 9777
			public Toggle toggleDirt;

			// Token: 0x04002632 RID: 9778
			public Texture texDirt;
		}

		// Token: 0x020005CD RID: 1485
		[Serializable]
		private class DOFInfo : SystemButtonCtrl.EffectInfo
		{
			// Token: 0x170004A5 RID: 1189
			// (get) Token: 0x060025E4 RID: 9700 RVA: 0x000DF5E0 File Offset: 0x000DD7E0
			// (set) Token: 0x060025E5 RID: 9701 RVA: 0x000DF5E8 File Offset: 0x000DD7E8
			private DepthOfField depthOfField { get; set; }

			// Token: 0x060025E6 RID: 9702 RVA: 0x000DF5F4 File Offset: 0x000DD7F4
			public void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo, DepthOfField _dof)
			{
				base.Init(_sprite, _profileInfo);
				this.depthOfField = _dof;
				this.toggleEnable.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedEnable));
				this.sliderFocalSize.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedFocalSize));
				this.sliderAperture.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedAperture));
			}

			// Token: 0x060025E7 RID: 9703 RVA: 0x000DF664 File Offset: 0x000DD864
			public override void UpdateInfo()
			{
				base.UpdateInfo();
				base.isUpdateInfo = true;
				this.toggleEnable.isOn = Singleton<Studio>.Instance.sceneInfo.enableDepth;
				this.sliderFocalSize.value = Singleton<Studio>.Instance.sceneInfo.depthFocalSize;
				this.sliderAperture.value = Singleton<Studio>.Instance.sceneInfo.depthAperture;
				this.UpdateParam();
				base.isUpdateInfo = false;
			}

			// Token: 0x060025E8 RID: 9704 RVA: 0x000DF6DC File Offset: 0x000DD8DC
			public override void UpdateParam()
			{
				if (this.depthOfField == null)
				{
					return;
				}
				this.depthOfField.enabled = Singleton<Studio>.Instance.sceneInfo.enableDepth;
				this.depthOfField.focalSize = Singleton<Studio>.Instance.sceneInfo.depthFocalSize;
				this.depthOfField.aperture = Mathf.Lerp(0.6f, 0.9f, Singleton<Studio>.Instance.sceneInfo.depthAperture);
			}

			// Token: 0x060025E9 RID: 9705 RVA: 0x000DF758 File Offset: 0x000DD958
			private void OnValueChangedEnable(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.enableDepth = _value;
				this.depthOfField.enabled = _value;
			}

			// Token: 0x060025EA RID: 9706 RVA: 0x000DF784 File Offset: 0x000DD984
			private void OnValueChangedFocalSize(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.depthFocalSize = _value;
				this.depthOfField.focalSize = _value;
			}

			// Token: 0x060025EB RID: 9707 RVA: 0x000DF7B0 File Offset: 0x000DD9B0
			private void OnValueChangedAperture(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.depthAperture = _value;
				this.depthOfField.aperture = Mathf.Lerp(0.6f, 0.9f, _value);
			}

			// Token: 0x04002633 RID: 9779
			public Toggle toggleEnable;

			// Token: 0x04002634 RID: 9780
			public Slider sliderFocalSize;

			// Token: 0x04002635 RID: 9781
			public Slider sliderAperture;
		}

		// Token: 0x020005CE RID: 1486
		[Serializable]
		private class VignetteInfo : SystemButtonCtrl.EffectInfo
		{
			// Token: 0x170004A6 RID: 1190
			// (get) Token: 0x060025ED RID: 9709 RVA: 0x000DF7F4 File Offset: 0x000DD9F4
			private VignetteModel vignette
			{
				get
				{
					return base.profileInfo.postProcessingProfile.vignette;
				}
			}

			// Token: 0x060025EE RID: 9710 RVA: 0x000DF808 File Offset: 0x000DDA08
			public override void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo)
			{
				base.Init(_sprite, _profileInfo);
				this.toggleEnable.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedEnable));
				this.sliderVignetting.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedVignetting));
			}

			// Token: 0x060025EF RID: 9711 RVA: 0x000DF858 File Offset: 0x000DDA58
			public override void UpdateInfo()
			{
				base.UpdateInfo();
				base.isUpdateInfo = true;
				this.toggleEnable.isOn = Singleton<Studio>.Instance.sceneInfo.enableVignette;
				this.sliderVignetting.value = Singleton<Studio>.Instance.sceneInfo.vignetteVignetting;
				this.UpdateParam();
				base.isUpdateInfo = false;
			}

			// Token: 0x060025F0 RID: 9712 RVA: 0x000DF8B4 File Offset: 0x000DDAB4
			public override void UpdateParam()
			{
				if (this.vignette == null)
				{
					return;
				}
				this.vignette.enabled = Singleton<Studio>.Instance.sceneInfo.enableVignette;
				this.SetParam(Singleton<Studio>.Instance.sceneInfo.vignetteVignetting);
			}

			// Token: 0x060025F1 RID: 9713 RVA: 0x000DF8F4 File Offset: 0x000DDAF4
			private void OnValueChangedEnable(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.enableVignette = _value;
				this.vignette.enabled = _value;
			}

			// Token: 0x060025F2 RID: 9714 RVA: 0x000DF920 File Offset: 0x000DDB20
			private void OnValueChangedVignetting(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.vignetteVignetting = _value;
				this.SetParam(_value);
			}

			// Token: 0x060025F3 RID: 9715 RVA: 0x000DF948 File Offset: 0x000DDB48
			private void SetParam(float _intensity)
			{
				VignetteModel.Settings settings = this.vignette.settings;
				settings.intensity = base.profileInfo.vignetteIntensity * _intensity;
				this.vignette.settings = settings;
			}

			// Token: 0x04002637 RID: 9783
			public Toggle toggleEnable;

			// Token: 0x04002638 RID: 9784
			public Slider sliderVignetting;
		}

		// Token: 0x020005CF RID: 1487
		[Serializable]
		private class AutomaticExposureInfo : SystemButtonCtrl.EffectInfo
		{
			// Token: 0x170004A7 RID: 1191
			// (get) Token: 0x060025F5 RID: 9717 RVA: 0x000DF98C File Offset: 0x000DDB8C
			private EyeAdaptationModel eyeAdaptation
			{
				get
				{
					return base.profileInfo.postProcessingProfile.eyeAdaptation;
				}
			}

			// Token: 0x170004A8 RID: 1192
			// (get) Token: 0x060025F6 RID: 9718 RVA: 0x000DF9A0 File Offset: 0x000DDBA0
			private PostProcessingBehaviour postProcessingBehaviour
			{
				get
				{
					return base.profileInfo.postProcessingBehaviour;
				}
			}

			// Token: 0x060025F7 RID: 9719 RVA: 0x000DF9B0 File Offset: 0x000DDBB0
			public override void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo)
			{
				base.Init(_sprite, _profileInfo);
				this.toggleEnable.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedEnable));
				this.sliderIntensity.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedIntensity));
			}

			// Token: 0x060025F8 RID: 9720 RVA: 0x000DFA00 File Offset: 0x000DDC00
			public override void UpdateInfo()
			{
				base.UpdateInfo();
				base.isUpdateInfo = true;
				this.toggleEnable.isOn = Singleton<Studio>.Instance.sceneInfo.enableEyeAdaptation;
				this.sliderIntensity.value = Singleton<Studio>.Instance.sceneInfo.eyeAdaptationIntensity;
				this.UpdateParam();
				base.isUpdateInfo = false;
			}

			// Token: 0x060025F9 RID: 9721 RVA: 0x000DFA5C File Offset: 0x000DDC5C
			public override void UpdateParam()
			{
				if (this.eyeAdaptation == null)
				{
					return;
				}
				this.eyeAdaptation.enabled = Singleton<Studio>.Instance.sceneInfo.enableEyeAdaptation;
				this.SetParam(Singleton<Studio>.Instance.sceneInfo.eyeAdaptationIntensity);
			}

			// Token: 0x060025FA RID: 9722 RVA: 0x000DFA9C File Offset: 0x000DDC9C
			private void OnValueChangedEnable(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.enableEyeAdaptation = _value;
				this.eyeAdaptation.enabled = _value;
			}

			// Token: 0x060025FB RID: 9723 RVA: 0x000DFAC8 File Offset: 0x000DDCC8
			private void OnValueChangedIntensity(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.eyeAdaptationIntensity = _value;
				this.SetParam(_value);
			}

			// Token: 0x060025FC RID: 9724 RVA: 0x000DFAF0 File Offset: 0x000DDCF0
			private void SetParam(float _intensity)
			{
				EyeAdaptationModel.Settings settings = this.eyeAdaptation.settings;
				settings.exposureCompensation = 0.6f + Mathf.Lerp(-0.2f, 0.2f, _intensity);
				this.eyeAdaptation.settings = settings;
				if (this.postProcessingBehaviour.EyeAdaptation != null)
				{
					this.postProcessingBehaviour.EyeAdaptation.ResetHistory();
				}
			}

			// Token: 0x04002639 RID: 9785
			public Toggle toggleEnable;

			// Token: 0x0400263A RID: 9786
			public Slider sliderIntensity;
		}

		// Token: 0x020005D0 RID: 1488
		[Serializable]
		private class NoiseInfo : SystemButtonCtrl.EffectInfo
		{
			// Token: 0x170004A9 RID: 1193
			// (get) Token: 0x060025FE RID: 9726 RVA: 0x000DFB5C File Offset: 0x000DDD5C
			private ChromaticAberrationModel chromaticAberration
			{
				get
				{
					return base.profileInfo.postProcessingProfile.chromaticAberration;
				}
			}

			// Token: 0x170004AA RID: 1194
			// (get) Token: 0x060025FF RID: 9727 RVA: 0x000DFB70 File Offset: 0x000DDD70
			private GrainModel grain
			{
				get
				{
					return base.profileInfo.postProcessingProfile.grain;
				}
			}

			// Token: 0x06002600 RID: 9728 RVA: 0x000DFB84 File Offset: 0x000DDD84
			public override void Init(Sprite[] _sprite, SystemButtonCtrl.ProfileInfo _profileInfo)
			{
				base.Init(_sprite, _profileInfo);
				this.toggleEnable.onValueChanged.AddListener(new UnityAction<bool>(this.OnValueChangedEnable));
				this.sliderIntensity.onValueChanged.AddListener(new UnityAction<float>(this.OnValueChangedIntensity));
			}

			// Token: 0x06002601 RID: 9729 RVA: 0x000DFBD4 File Offset: 0x000DDDD4
			public override void UpdateInfo()
			{
				base.UpdateInfo();
				base.isUpdateInfo = true;
				this.toggleEnable.isOn = Singleton<Studio>.Instance.sceneInfo.enableNoise;
				this.sliderIntensity.value = Singleton<Studio>.Instance.sceneInfo.noiseIntensity;
				this.UpdateParam();
				base.isUpdateInfo = false;
			}

			// Token: 0x06002602 RID: 9730 RVA: 0x000DFC30 File Offset: 0x000DDE30
			public override void UpdateParam()
			{
				if (this.chromaticAberration == null || this.grain == null)
				{
					return;
				}
				this.chromaticAberration.enabled = Singleton<Studio>.Instance.sceneInfo.enableNoise;
				this.grain.enabled = Singleton<Studio>.Instance.sceneInfo.enableNoise;
				this.SetParam(Singleton<Studio>.Instance.sceneInfo.noiseIntensity);
			}

			// Token: 0x06002603 RID: 9731 RVA: 0x000DFCA0 File Offset: 0x000DDEA0
			private void OnValueChangedEnable(bool _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.enableNoise = _value;
				this.chromaticAberration.enabled = _value;
				this.grain.enabled = _value;
			}

			// Token: 0x06002604 RID: 9732 RVA: 0x000DFCD8 File Offset: 0x000DDED8
			private void OnValueChangedIntensity(float _value)
			{
				if (base.isUpdateInfo)
				{
					return;
				}
				Singleton<Studio>.Instance.sceneInfo.noiseIntensity = _value;
				this.SetParam(_value);
			}

			// Token: 0x06002605 RID: 9733 RVA: 0x000DFD00 File Offset: 0x000DDF00
			private void SetParam(float _intensity)
			{
				ChromaticAberrationModel.Settings settings = this.chromaticAberration.settings;
				settings.intensity = base.profileInfo.chromaticAberrationIntensity * _intensity;
				this.chromaticAberration.settings = settings;
				GrainModel.Settings settings2 = this.grain.settings;
				settings2.intensity = base.profileInfo.grainIntensity * _intensity;
				this.grain.settings = settings2;
			}

			// Token: 0x0400263B RID: 9787
			public Toggle toggleEnable;

			// Token: 0x0400263C RID: 9788
			public Slider sliderIntensity;
		}
	}
}
